package org.cu.ooad.finalproject.layar;

import java.util.logging.Logger;

import com.google.appengine.repackaged.org.json.JSONException;
import com.google.appengine.repackaged.org.json.JSONObject;

public class Action {

	private final static Logger log = Logger.getLogger(POI.class.getName());

	private String uri;
	private String label;

	public Action(String uri, String label) {
		this.uri = uri;
		this.label = label;
	}

	public Action() {
		this("", "");
	}

	public JSONObject getJSON() {
		JSONObject obj = new JSONObject();
		try {
			obj.put("uri", uri);
			obj.put("label", label);
		} catch (JSONException e) {
			log.warning("Error while constructing action array: "+e.getMessage());
		}
		return obj;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getLabel() {
		return label;
	}

	public String getUri() {
		return uri;
	}

	public void setUri(String uri) {
		this.uri = uri;
	}
}
